﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Elf32_Addr = System.UInt32;
using Elf32_Half = System.UInt16;
using Elf32_Off = System.UInt32;
using Elf32_Sword = System.Int32;
using Elf32_Word = System.UInt32;



namespace MipsMachine.Elf
{
    public enum FileType : ushort
    {
        ET_NONE = 0,
        ET_REL = 0,
        ET_EXEC = 2,
        ET_DYN = 3,
        ET_CORE = 4,
        ET_LOPROC = 0xFF00,
        ET_HIPROC = 0xFFFF
    }
    public enum Machine : ushort
    {
        EM_NONE = 0,
        EM_M32 = 1,
        EM_SPARC = 2,
        EM_386 = 3,
        EM_68K = 4,
        EM_88K = 5,
        EM_860 = 7,
        EM_MIPS = 8,
        EM_MIPS_RS4_BE
    }
    public enum Version : ushort
    {
        EV_NONE = 0,
        EV_CURRENT = 1
    }

	public unsafe struct ElfHeader
	{
        public const int EI_NIDENT = 16;
        public fixed byte e_ident[EI_NIDENT];
        public Elf32_Half e_type;
        public Elf32_Half e_machine;
        public Elf32_Word e_version;
        public Elf32_Addr e_entry;
        public Elf32_Off e_phoff;
        public Elf32_Off e_shoff;
        public Elf32_Half e_ehsize;
        public Elf32_Half e_phentsize;
        public Elf32_Half e_phnum;
        public Elf32_Half e_shentsize;
        public Elf32_Half e_shnum;
        public Elf32_Half e_shstrndx;


	}
}
